﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using VPN.Manage;


namespace VPNNew
{
    public partial class MyVPNAccount : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public override string PageCode
        {
            get { return "MyAccounts"; }
        }

        protected void btnNew_Click(object sender, EventArgs e)
        {
            if (AccountManage.GetAccountList(null, Page.User.Identity.Name, AccountStatus.All, null, null, null, null).Count() > 5)
                throw new InvalidOperationException(GRString("ExceedFiveVPNAccountLimit"));

            Response.Redirect("~/NewPO.aspx");
        }

    }
}
